This invention is related to, a sorting apparatus and a method for sorting data based on a plurality of reference axis data.
An image forming apparatus forms a variety of kinds of image signals based on image information supplied thereto from outside. The image forming apparatus then provides the image signals. This image forming apparatus can form and provide not only two-dimensional plane images but also three-dimensional stereoscopic images. The image forming apparatus is therefore utilized for such uses as, for example, a video game using stereoscopic images, operating simulators for airplanes and other kinds of vehicles, computer graphics, a display of a CAD (Computer Aided Designing) apparatus, etc.
If a stereoscopic image having depth is formed in real time by means of an image forming apparatus, each polygon or object needs to be sorted frame by frame, at high speed, based on information regarding a coordinate axis of image depth direction, that is, based on information regarding the Z axis.
FIG. 1 is a flowchart showing processes, which processes is related to the present invention regarding a stereoscopic image. For the purpose of realizing a stereoscopic image accurately, many polygons are needed to form the image, for example, ten thousand. Thus, if the processes shown in FIG. 1 are executed using a number of polygons to be processed double an original number, a geometric conversion step S1 and an image drawing step B3 respectively need double the original processing time. Further, an indicating step S4 needs the same time as when processing the original number of polygons. In contrast, a sorting step S2 needs more than double the time required when processing the original number of polygons. Further, the more the number of polygons to be processed is increased, the more the ratio of a processing time to total processing time increase. Thus a need for high-speed processing has been manifested.
In order to achieve a high-speed processing, a sorting apparatus for sorting a plurality of stereoscopic data based on a predetermined reference axis, that is, the Z axis, has to be further developed.
Conventional sorting is performed in such a manner that Z axis information included with each data is compared with each adjacent data, one by one. Each data is sorted based on the result of the above mentioned comparison after the comparison takes place. This operation is performed for all of the data.
In conventional technology, the following operation is needed in performing the above mentioned sorting operation. That is, data transfer between memories is repeated many times, the data transferred being all of the Z axis information. It is difficult therefore to perform this data sorting with high speed. In particular, increase of the number of Z axis data to be compared results in large increase in the time required for the sorting. Thus, a relatively large scale computer is needed to make this sorting operation be in high speed one. As a result, it has been a problem that the apparatus needed for the sorting becomes complicated and then costly.